fn createStrykerCurve =
(
totalLength = 50
ss = SplineShape pos:[0,0,0]
addNewSpline ss
addKnot ss 1 #corner #line [0,0,0]
addKnot ss 1 #smooth #line [9.9915,0.3387,0]
addKnot ss 1 #smooth #line [19.9831,4.9958,0]
addKnot ss 1 #smooth #line [29.9746,8.9754,0]
addKnot ss 1 #smooth #line [39.9661,10.6689,0]
addKnot ss 1 #smooth #line [49.9577,10.6689,0]
addKnot ss 1 #smooth #line [59.9492,8.9754,0]
addKnot ss 1 #smooth #line [69.9407,4.9958,0]
addKnot ss 1 #smooth #line [79.9323,0.3387,0]
addKnot ss 1 #smooth #line [87.4682,0,0]



close ss 1
updateShape ss
rotate ss (angleaxis 90 [1,0,0])
select ss
--modPanel.addModToSelection (Extrude ()) ui:on
--$.modifiers[#Extrude].amount = 50

max create mode
ss.pivot = ss.center
ss.pivot.z = 0
max modify mode
modPanel.addModToSelection (Extrude ()) ui:on
$.modifiers[#Extrude].amount = totalLength
$.modifiers[#Extrude].segs = 4

ss.pivot.x = ss.center.x	

modPanel.addModToSelection (Taper ()) ui:on
$.modifiers[#Taper].effectaxis = 1 --only want to make z axis smaller
$.modifiers[#Taper].amount = -0.2952 -- 5.67 -> 9.21, 9.21 came out through scanner as 11.56 so add (11.56-9.21) to result, so 1-(5.67/9.21), 
 												--then played with amount til vertex was at right height
$.modifiers[#Taper].curve = -0.37

modPanel.addModToSelection (Taper ()) ui:on	
$.modifiers[#Taper].effectaxis = 2 --only want to make z axis smaller
$.modifiers[#Taper].amount = -0.62 -- width narrows from 88 mm to ~ 60 mm, played with amount til this was right	
rotate ss (angleaxis 180 [0,0,1])	

ss.pivot = ss.center
ss.pivot.z = 0
ss.center = [0,0,ss.center.z]

-- maxOps.cloneNodes ss newNodes:&ss2
-- ss2.center.z = ss.center.z + baseHeight
-- select ss2
-- ss2 = $	--have to do some dereferencing here

-- ProBoolean.CreateBooleanObject ss2 ss 2 0 1; --2 mean Subtraction ,0 mean Reference, 1 mean Retain Original Material

return ss
)

fn makeStrykerCurve =
(
aBoxLength = 50
aBoxWidth = 85
aBoxThickness = 0.5
A = createStrykerCurve();
aBox = Box lengthsegs:5 widthsegs:5 heightsegs:1 length:aBoxLength width:aBoxWidth  height:aBoxThickness mapcoords:on pos:[0,0,0] isSelected:on	
modPanel.addModToSelection (Taper ()) ui:on	
aBox.modifiers[#Taper].amount = -0.8
aBox.modifiers[#Taper].primaryaxis = 1	
aBox.modifiers[#Taper].curve = 0.6
boundBox = copy aBox	
	
diff = copy A
ProBoolean.CreateBooleanObject aBox diff 2 0 1; 	
	
select boundBox
scale boundBox [1,1,30]


B = createStrykerCurve();
	
B.center.z = b.center.z + 1
ProBoolean.CreateBooleanObject B A 2 0 1; --2 mean Subtraction ,0 mean Reference, 1 mean Retain Original Material
-- at this point we have it where we want it, now just have to duplicate and subtract
B.center.z = b.center.z - 1	

ProBoolean.CreateBooleanObject B aBox 0 0 1; 			

ProBoolean.CreateBooleanObject B boundBox 1 0 1; 	
return B
)

 	